Favicon

You are here: Home > API Reference > Apple > Apple Commands > List commands grouped by type

List commands grouped by type

Required Permission: mdm.apple.command.list

Retrieves commands for the specified target, grouped by command type for consolidated viewing.

GET
https://api.applivery.io/v1/organizations/{organizationId}/mdm/apple/enterprise/commands/{targetType}/{targetId}/grouped
curl -X GET "https://api.applivery.io/v1/organizations/{organizationId}/mdm/apple/enterprise/commands/{targetType}/{targetId}/grouped" \
  -H "Authorization: Bearer <YOUR_API_KEY>"
const response = await fetch("https://api.applivery.io/v1/organizations/{organizationId}/mdm/apple/enterprise/commands/{targetType}/{targetId}/grouped", {
  method: "GET",
  headers: {
    Authorization: "Bearer <YOUR_API_KEY>",
  },
});

const data = await response.json();
import requests

response = requests.get(
    "https://api.applivery.io/v1/organizations/{organizationId}/mdm/apple/enterprise/commands/{targetType}/{targetId}/grouped",
    headers={"Authorization": "Bearer <YOUR_API_KEY>"},
)

data = response.json()

Request

Send your API key in the request header authorization
Example: Authorization: Bearer <token>

organizationId string
required
Organization identifier or slug used in path parameters for scoping API operations to specific organizational contexts.
Match pattern: ^(([a-fA-F0-9]{24})|([a-zA-Z0-9\\-]{3,}))$
targetType string
required
Command target classification specifying whether operation applies to device or device user affecting scope and available command types.
devicedeviceUser
targetId string
required
Identifier for the command target supporting device ID, serial number, IMEI, or user identifier enabling flexible targeting.
Match pattern: ^(([a-fA-F0-9]{24})|(\w{1,}))$

page integer
optional
Page number for paginated results enabling navigation through large command group datasets with consistent result sizes.
limit integer
optional
Maximum number of grouped command records per page controlling response payload size and client-side rendering performance.
groupName string
optional
Logical grouping identifier categorizing related commands together for consolidated display and operational organization within management interfaces.
≤ 128 characters
types array
optional
Array of command group types for filtering operations enabling retrieval of multiple related command categories simultaneously.
type string
optional
Command group classification organizing operations by logical category such as sync, refresh, authentication, or manual execution.
refreshsyncauthenticatemanualsyncRefreshtokendeviceRemovedreinstallMobileConfigupdateCertificatedeclarativefixpreSync

Responses

200 Response application/json
status boolean optional
data object optional
items array [object] optional
groupName string optional
Logical grouping identifier categorizing related commands together for consolidated display and operational organization within management interfaces.
≤ 128 characters
lastDate string optional
Timestamp of the most recent command within this group enabling chronological sorting and activity monitoring.
Format: date-time
commands array [object] optional
Array of command records belonging to this group organized together for consolidated display and operational review.
totalDocs integer optional
limit integer optional
hasPrevPage boolean optional
hasNextPage boolean optional
page integer optional
totalPages integer optional
prevPage integer optional
nextPage integer optional
lean boolean optional
{
    "status": true,
    "data": {
        "items": [
            {
                "groupName": "DeviceInformation",
                "lastDate": "2026-02-10T14: 30:00Z",
                "commands": [
                    {
                        "id": "507f1f77bcf86cd799439011",
                        "status": "Acknowledged",
                        "createdAt": "2026-02-10T12: 00:00Z"
                    }
                ]
            }
        ],
        "totalDocs": 0,
        "limit": 0,
        "hasPrevPage": true,
        "hasNextPage": true,
        "page": 0,
        "totalPages": 0,
        "prevPage": 0,
        "nextPage": 0,
        "lean": true
    }
}
401 Response application/json
status boolean optional
false
error object optional
code number optional
4004
message string optional
Invalid Token
{
    "status": false,
    "error": {
        "code": 4002,
        "message": "No auth token"
    }
}
404 Response application/json
status boolean optional
false
error object optional
code number optional
3001
message string optional
Entity not found
{
    "status": false,
    "error": {
        "code": 3001,
        "message": "Entity not found"
    }
}